package books.to.africa

class PhotoUploadCommand {
	byte[ ] teacherPhoto
	byte[ ] schoolPhoto
	String userName
}

class PhotoController {

    def upload = { PhotoUploadCommand puc ->
		def teacher = teacher.findByuserName(puc.userName)
		teacher.profile.teacherPhoto = puc.teacherPhoto
		redirect (action: 'view', id: puc.userName)
	}
	def form = {
		[ teacherList : teacher.list() ]
	}
	def view = {
		
	}
}
